<footer>
  <p class='footer-left'>
    <a title='{{ 'Connect with us on the fediverse!'|trans }}' aria-label='{{ 'Connect with us on the fediverse!'|trans }}' href='https://pouet.chapril.org/@deltablot' style='color:#343434'>⁂
    </a>

    <a title='{{ 'Code repository on GitHub'|trans }}' aria-label='{{ 'Code repository on GitHub'|trans }}' style='color:#343434' href='https://github.com/elabftw/elabftw'>
      <i title='GitHub' class='fab fa-github fa-lg'></i>
    </a>

    <a title='{{ 'Join the discussion on Gitter'|trans }}' aria-label='{{ 'Join the discussion on Gitter'|trans }}' style='color:#343434' href='https://gitter.im/elabftw/elabftw'>
      <i title='Gitter' class='fas fa-comment-dots fa-lg'></i>
    </a>

    <a title='{{ 'Submit feedback'|trans }}' aria-label='{{ 'Report bug'|trans }}' data-action='report-bug' style='color:#343434' href='#'>
      <i title='Report bug' class='fas fa-bug fa-lg'></i>
    </a>

    <span>
      {%- if App.Config.configArr.privacy_policy -%}
        <a href='#' data-policy='privacy' data-action='show-policy'>{{ App.Config.configArr.privacy_policy_name }}</a>
      {%- endif -%}
      {%- if App.Config.configArr.terms_of_service -%}
        <a href='#' data-policy='tos' data-action='show-policy'>{{ App.Config.configArr.terms_of_service_name }}</a>
      {%- endif -%}
      {%- if App.Config.configArr.a11y_statement -%}
        <a href='#' data-policy='a11y' data-action='show-policy'>{{ App.Config.configArr.a11y_statement_name }}</a>
      {%- endif -%}
      {%- if App.Config.configArr.legal_notice -%}
        <a href='#' data-policy='legal' data-action='show-policy'>{{ App.Config.configArr.legal_notice_name }}</a>
      {%- endif -%}
    </span>
  </p>

  <p class='footer-right'>
  {{ 'Powered by'|trans }}
    <a href='https://www.elabftw.net' target='_blank' rel='noopener'>eLabFTW</a> {% if App.Session.has('is_auth') %}<a href="{{ App.getWhatsnewLink(constant('Elabftw\\Elabftw\\App::INSTALLED_VERSION_INT')) }}" target='_blank' rel='noopener'>{{ constant('Elabftw\\Elabftw\\App::INSTALLED_VERSION') }}</a>{% endif %}{% if App.demoMode %} | Demo mode{% endif %}
    <br>
    Made with ♥ by <a href='https://www.deltablot.com' target='_blank' rel='noopener'>Deltablot</a>
    {% if App.devMode -%}
      <br>{{ 'Page generated in' }} {{ generationTime() }} {{ 'seconds'|trans }}
      ({{ numberOfQueries() }} SQL)
      <br>{{ 'Memory usage:'|trans }}
      {{ memoryUsage()|formatBytes }} ({{ memoryUsage() }} {{ 'bytes'|trans }})
    {% endif %}
  </p>
</footer>

{# Modal for selecting language #}
<div class='modal fade' id='selectLanguageModal' tabindex='-1' role='dialog' aria-labelledby='selectLanguageModalLabel'>
  <div class='modal-dialog' role='document'>
    <div class='modal-content'>
      <div class='modal-header'>
        <h5 class='modal-title' id='selectLanguageModalLabel'>{{ 'Select language'|trans }}</h5>
        <button type='button' class='close' data-dismiss='modal' aria-label='{{ 'Close'|trans }}'>
          <span aria-hidden='true'>&times;</span>
        </button>
      </div>
      <div id='selectLanguageForm' class='modal-body' data-wait='{{ 'Please wait…'|trans }}'>
        <label for='langSelect' class='col-form-label'>{{ 'Language'|trans }}</label>
        <select class='form-control' id='langSelect'>
          {% for lang, text in langsArr|sort %}
            <option value='{{ lang }}'
            {{- App.getLang() == lang ? ' selected' -}}
            >{{ text }}</option>
          {% endfor %}
        </select>
      </div>
      <div class='modal-footer'>
        <button type='button' class='btn btn-ghost' data-dismiss='modal'>{{ 'Cancel'|trans }}</button>
        <button type='button' data-action='select-lang' data-dismiss='modal' class='btn btn-primary'>{{ 'Save'|trans }}</button>
      </div>
    </div>
  </div>
</div>

<div id='user-prefs'
  data-lang='{{ App.getLang }}'
  data-jslang='{{ App.getJsLang }}'
  data-isodate='{{ App.Session.has('is_auth') ? App.Users.userData.use_isodate : '0' }}'
  data-sc-search='{{ App.Users.userData.sc_search|default('s') }}'
  data-sc-todolist='{{ App.Users.userData.sc_todo|default('t') }}'
  data-sc-create='{{ App.Users.userData.sc_create|default('c') }}'
  data-sc-edit='{{ App.Users.userData.sc_edit|default('e') }}'
  data-sc-favorite='{{ App.Users.userData.sc_favorite|default('f') }}'
  data-sc-disabled='{{ App.Users.userData.disable_shortcuts|default('0') }}'
  ></div>

{# this is read by JS to get info about the state of current user #}
<script type='application/json' id='core'>
  {
    "isAnon": {{ App.Session.has('is_anon') ? 'true' : 'false' }},
    "isAuth": {{ App.Session.has('is_auth') ? 'true' : 'false' }},
    "currentTeam": {{ App.Users.userData.team|default(-1) }}
  }
</script>
